"""
@author: Leo
@version: 1.0.0
@file: custom_logger.py
@time: 2023/9/25 11:23 PM
"""

import logging
from logging.handlers import RotatingFileHandler


class ClassNameHandler(RotatingFileHandler):
    def emit(self, record):
        # Add the class name to the log record's message
        record.msg = f'[{record.name}.{record.funcName}]: {record.msg}'
        super().emit(record)
